package com.czk.java;

import org.apache.spark.sql.SparkSession;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/12/14 10:16
 */
public class JavaSparkHive {
    public static void main(String[] args) {
        SparkSession sparkSession = SparkSession.builder().appName("java").master("local[*]")
                .config("hive.metastore.uris","thrift://bigdata01:30006").enableHiveSupport().getOrCreate();
        sparkSession.sparkContext().setLogLevel("WARN");

        sparkSession.sql("show tables").show();

    }
}
